<template>
    <div class="wx-guzhang">
        <section>
            <div class="list">
                <div class="flex">
                    <b>
                        设备信息
                    </b>
                </div>
                <div class="flex">
                    设备名称：{{detailList.equip.equipName}}
                </div>
                <div class="flex">
                    设备编号：{{detailList.equipId}}
                </div>
                <div class="flex">
                    设备型号：{{detailList.equip.equipSize}}
                </div>
                <div class="flex">
                    设备分类：
                </div>
                <div class="flex">
                    设备位置：{{detailList.equip.equipLocation}}
                </div>
            </div>
            <div class="list">
                <div class="flex">
                    <b>
                        故障信息
                    </b>
                </div>
                <div class="flex">
                    故障描述：
                </div>
                <div class="flex" style="padding-left:1rem;">
                    {{detailList.faultNote}}
                </div>
                <div class="flex">
                    图片详情：
                </div>
                <div class="flex">
                    <img class="wx-img" v-for="item in detailList.faultImageArr" :key="item.value" :src="item" alt="">
                </div>
            </div>
            <div class="list" v-if="detailList.confirmNote!=null">
                <div class="flex">
                    <b>
                        现场确认信息
                    </b>
                </div>
                <div class="flex" style="padding-left:1rem;">
                    {{detailList.confirmNote}}
                </div>
                <div class="flex">
                    图片详情：
                </div>
                <div class="flex">
                    <img class="wx-img" v-for="item in detailList.confirmImgArr" :key="item.value" :src="item" alt="">
                </div>
            </div>
        </section>
        <button v-if="detailList.confirmNote==null" type="button" class="btn btn-block btn-primary" @click="$router.push({ path: 'queren', query: { id: $route.query.id } })">现场确认</button>
        <button v-if="detailList.confirmNote!=null" type="button" class="btn btn-block btn-primary">提交</button>

    </div>
</template>

<script>
export default {
    data() {
        return {
            detailList: {
                equip:{

                }
            },
        }
    },
    mounted() {
        this.getDetail()
    },
    methods: {
        //维修详情
        getDetail() {
            this.$api.weixiu.repairequipdetail({
                id: this.$route.query.id
            }).then(res => {
                if (res.success) {
                    this.detailList = res.data
                }
            });
        }
    }
}
</script>

<style>
</style>
